#!/bin/bash

# build app with the prebuilt server
# run in mingw64

if [ "$1" = "init" ]; then
    echo "[*] Running meson setup..."

    meson setup x \
        -Dportable=true \
        -Dprebuilt_server=server/build/outputs/apk/debug/server-debug.apk

    # 可选：直接退出，不继续构建
    exit 0
fi

echo "[*] Running ninja build..."
ninja -Cx  # DO NOT RUN AS ROOT
